This Twine is a test of Twine's features.
[[Arrays]]
[[Hooks]]
[[Input]]
[[Markdown]]
[[Variables]][[Return->Start]]
```` Surround code.
#``#``Header 1
##``##``Header 2
###``###``Header 3
####``####``Header 4
#####``#####``Header 5
######``######``Header 6
``---``
---
==>
==> Right-aligned.
=><=
=><= Centered
<==>
<==> Justified
=><==
=><== 33% Left-align, 67% right-align.
<==
<== Left-aligned.
* ``*`` Bullet 1
* `` *`` Bullet 2
** ``**`` Indented Bullet
*** ``***`` Three bullets.
**** ``****`` Four bullets.
0. ``0.`` Numbered item.
0. `` 0.`` Numbered item 2.
0.0. `` 0.0.`` Indented numbered item.
``''`` ''Bold.'' ``''`` ``**Bold**``
``//`` //Italics.// ``//`` ``*Italics*``
``//''`` //''Bold Italics.''// ``''//``
``^^`` ^^Superscript^^ ``^^``
``~~`` ~~Delete~~ ``~~``
``<mark>`` <mark>Marked.</mark> ``</mark>``
(font: "monospace")[``<!-- Commented. -->``]
(font: "monospace")[``(text-style: "")[Text.]``]
(font: "monospace")[``(font: "font name")[Text.]``]
(font: "Courier New")[Courier New]
(font: "monospace")[``(color: hex or name)[Text.]``]
(color: yellow + blue)[yellow + blue]
(color: #f00)[``#f00``]
(color: #0000ff)[``#0000ff``]
(color: lime)[lime]
(text-style: "strike")[strikethrough]
(text-style: "blink")[blink]
(text-style: "mark")[mark]
(text-style: "outline")[outline]
(text-style: "shadow")[shadow]
(text-style: "emboss")[emboss]
(text-style: "condense")[condense]
(text-style: "expand")[expand]
(text-style: "blur")[blur]
(text-style: "blurrier")[blurrier]
(text-style: "smear")[smear]
(text-style: "mirror")[mirror]
(text-style: "upside-down")[upside-down]
(text-style: "fade-in-out")[fade-in-out]
(text-style: "rumble")[rumble]
(text-style: "shudder")[shudder]
(font: "monospace")[``(link: "Click to dissolve.")[(t8n: "dissolve")[dissolve]]``]
(link: "Click to dissolve.")[(t8n: "dissolve")[dissolve]]
(link: "Click to shudder.")[(t8n: "shudder")[shudder]]
(link: "Click to pulse.")[(t8n: "pulse")[pulse]]
(font: "monospace")[``[[Return->to->Start]]``]
[[Return->to->Start]][[Return->Start]]
This passage may change when it is rendered: [[Refresh->Variables]]
``{ }`` Reduces spacing that can occur from coding, allowing spaced code.
The variable ``$var`` is currently $var.
(font: "monospace")[``(set: $x to 5)``] (set: $x to 5)
The variable ``$x`` is currently $x.
(font: "monospace")[``(either: "heads", "tails")``]
(either: "heads", "tails")
(font: "monospace")[``(random: 1, 6)``]
(random: 1, 6)
Fudge Dice are six-sided dice with two minus sides, two blank sides, and two plus sides. You roll four of them and total the results, then add it to any modifiers.
(font: "monospace")[``(print: (random: -1, 1) + (random: -1, 1) + (random: -1, 1) + (random: -1, 1))``]
(print: (random: -1, 1) + (random: -1, 1) + (random: -1, 1) + (random: -1, 1))
To see each die result instead, we need more variables.
(font: "monospace")[(``set:`` ``$r1`` to (``random:`` -1, 1)] Repeat for ``$r2``, ``$r3``, ``$r4``.
(font: "monospace")[(``set:`` ``$rt`` to ``$r1`` + ``$r2`` + ``$r3`` + ``$r4``)
``$r1`` + ``$r2`` + ``$r3`` + ``$r4`` = ``$rt``]
{ (set: $r1 to (random: -1, 1))
(set: $r2 to (random: -1, 1))
(set: $r3 to (random: -1, 1))
(set: $r4 to (random: -1, 1))
(set: $rt to $r1 + $r2 + $r3 + $r4) }
$r1 + $r2 + $r3 + $r4 = $rt
Operators: +, -, /, *, %, >, <, >=, <=, is, not
Value macros: floor, ceil, round, min, max, abs, sign, sin, cos, tan
(font: "monospace")[``(print: time)``]
(print: time)ms to render passage.
(font: "monospace")[``(if: $r1 is 1)[One.](elseif: $r1 is -1)[Negative one.](else:)[Zero.]``]
(if: $r1 is 1)[One.](elseif: $r1 is -1)[Negative one.](else:)[Zero.]
********** [[Refresh->Variables]]
********** [[Arrays]]
********** [[Return->Start]][[Return->Start]]
``|tag>[This is a hook.]``
``[This is a hook.]<tag|``
[This is a hook.]<tag|
(font: "monospace")[``(print: ?tag)``]
(print: ?tag)
(font: "monospace")[``(font: "Courier New")[?tag]``]
(font: "Courier New")[?tag]
``|coin>[Flip a coin.]``
(font: "monospace")[``(if: (either: "heads", "tails") is "tails")[The coin shows tails.]``
``(else:)[(replace: ?coin)[The coin shows heads.]]``]
{ |coin>[Flip a coin.]
(if: (either: "heads", "tails") is "tails")[The coin shows tails.]
(else:)[The coin shows heads.] }
[[Refresh->Hooks]]
Example from <a href="http://twine2.neocities.org/" target="_blank">twine2.neocities.org</a>:
(font: "monospace")[``Your [ballroom gown]<c1| is [bright red]<c2| with [silver streaks]<c3|, and covered in [moonstones]<c4|.
(click: ?c1)[A hand-me-down from your great aunt.]
(click: ?c2)[A garish shade, to your reckoning.]
(click: ?c3)[Only their faint shine keeps them from being seen as grey.]
(click: ?c4)[Dreadfully heavy, they weigh you down and make dancing arduous.]``]
Your [ballroom gown]<c1| is [bright red]<c2| with [silver streaks]<c3|, and covered in [moonstones]<c4|.
(click: ?c1)[A hand-me-down from your great aunt.]
(click: ?c2)[A garish shade, to your reckoning.]
(click: ?c3)[Only their faint shine keeps them from being seen as grey.]
(click: ?c4)[Dreadfully heavy, they weigh you down and make dancing arduous.]
[[Return->Start]][[Return->Start]]
[[Variables]]
(font: "monospace")[``(set: $a to (array: 1, "two", "3") + (array: 4, "five"))
$a``]
(set: $a to (array: 1, "two", "3") + (array: 4, "five")) $a
(font: "monospace")[``(if: $a contains "3")[True](else:)[False]``]
(if: $a contains "3")[True](else:)[False]
(font: "monospace")[``(if: 3 is in $a)[True](else:)[False]``]
(if: 3 is in $a)[True](else:)[False]
(font: "monospace")[``(print: $a's 2nd)``]
(print: $a's 2nd)
(font: "monospace")[``(print: $a's 2ndlast)``]
(print: $a's 2ndlast)
(font: "monospace")[``(print: (text: $a's 1st + $a's 4th) + " units.")``]
(print: (text: $a's 1st + $a's 4th) + " units.")
(font: "monospace")[``(count: $a, "five")``]
(count: $a, "five")
(font: "monospace")[``(substring: "String", 3, 5)``]
(substring: "String", 2, 5)
(font: "monospace")[``(subarray: $a, 2, 3)``]
(subarray: $a, 2, 3)
(font: "monospace")[``(set: $tree to (a: "Elm", "Larch", "Spruce"))
(if: "Larch" is in $tree)[Number two: The larch.](else:)[That is not a tree.]``]
(set: $tree to (a: "Elm", "Larch", "Spruce"))(if: "Larch" is in $tree)[Number two: The larch.](else:)[That is not a tree.]
(font: "monospace")[``(set: $thief to (datamap: "Strength", 9, "Health", 9, "Dexterity", 12, "Intellect", 10))
(print: $thief's Strength)
(set: $thief's Health to 8)
(print: $thief)``]
(set: $thief to (datamap: "Strength", 9, "Health", 9, "Dexterity", 12, "Intellect", 10))(print: $thief's Strength)
(set: $thief's Health to 8)(print: $thief)
[[Return->Start]]Last person to sign: $name
Name: (input: $name)
(radio: $speak "Hello")
(radio: $speak "Goodbye")
(checkbox: $feels "Good")
(checkbox: $feels "Well")